Formal Aspects of Polyvariant Specialization
نویسنده
چکیده
We present the first formal correctness proof of an offline polyvariant specialization algorithm for first-order recursive equations. As a corollary, we show that the specialization algorithm generates a program implementing the search phase of the Knuth-Morris-Pratt algorithm from an inefficient but binding-time-improved string matcher. ∗Basic Research in Computer Science (www.brics.dk), funded by the Danish National Research Foundation.
منابع مشابه
An Approach to Polyvariant Binding Time Analysis for a Stack-Based Language
Binding time analysis (BTA) is used in specialization by means of partial evaluation method. Usual BTA only annotates a source program. Polyvariant BTA transforms a source program to an annotated one. Polyvariant BTA is known technique for functional languages. In this paper polyvariant BTA for a model imperative stack-based language is presented. It is described by means of building annotated ...
متن کاملRemoving Superfluous Versions in Polyvariant Specialization of Prolog Programs
Polyvariant specialization allows generating multiple versions of a procedure, which can then be separately optimized for different uses. Since allowing a high degree of polyvariance often results in more optimized code, polyvariant specializers, such as most partial evaluators, can generate a large number of versions. This can produce unnecessarily large residual programs. Also, large programs...
متن کاملPolyvariant Expansion and Compiler Generators
Polyvariant expansion is a binding-time-improving transformation for ooine partial evaluation. We show how to achieve it automatically for a higher-order functional language using the interpretive approach. We have designed and implemented an interpreter that statically propagates binding times. When specialized with respect to a source program, it performs polyvariant expansion. Extending the ...
متن کاملPreliminary Report on a Self-Applicable Online Partial Evaluator for Flowchart
This is a preliminary report on a self-applicable online partial evaluator for a flowchart language with recursive calls. Self-application of the partial evaluator yields generating extensions that are as efficient as those reported in the literature for offline partial evaluation. This result is remarkable because partial evaluation folklore has indicated that online partial evaluation techniq...
متن کاملAvoiding Redundant Specialization during Partial Evaluation
Existing partial evaluators use a strategy called polyvariant specialization, which involves specializing program points on the known portions of their arguments, and re-using such specializations only when these known portions match exactly. We show that this re-use criterion is overly restrictive, and misses opportunities for sharing in residual programs, thus producing large residual program...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2005